"""
#!!===========================================================
#版权（C）2023, Huawei Technologies Co., HUTAF xDevice
#!!===========================================================
#用例编号:     Security_IAM_AuthWidget_Face_Auth_Func_0038
#用例名称:     人脸未录入
#用例作者:
#修改说明:
#!!===========================================================
"""

# -*- coding: utf-8 -*-
from devicetest.core.test_case import TestCase
from devicetest.aw.OpenHarmony import CommonOH
from aw.Useriam.AuthWidget import SecurityUserIamAuthWidgetDepend


class Security_IAM_AuthWidget_Face_Auth_Func_0038(TestCase):

    def __init__(self, controllers):
        self.TAG = self.__class__.__name__
        self.tests = [
            "test_step1"
        ]
        TestCase.__init__(self, self.TAG, controllers)

    def setup(self):
        print("预置工作：初始化手机开始............" + self.devices[0].device_sn)
        CommonOH.wake(self.device1)

    def test_step1(self):
        print("测试步骤：测试hap拉起单人脸认证")
        SecurityUserIamAuthWidgetDepend.widget(self.device1, "2", "10000", "人脸认证", "", "1")
        print("检查点2：控件弹出报错")
        CommonOH.checkIfTextExist(self.device1, "凭据未录入", expect=True)

    def teardown(self):
        print("收尾工作：...................")
        CommonOH.goHome(self.device1)